const getters = {
    sidebar: state => state.app.sidebar,
    size: state => state.app.size,
    device: state => state.app.device,
    visitedViews: state => state.tagsView.visitedViews,
    cachedViews: state => state.tagsView.cachedViews,
    introduction: state => state.user.introduction,
    roles: state => state.user.roles,
    permission_routes: state => state.permission.routes,
    errorLogs: state => state.errorLog.logs,

    token: state => state.user.token,                       // 建立token的映射-开放token属性
    name: state => state.user.userInfo.username,            // 建立用户名称的映射
    userId: state => state.user.userInfo.userId,            // 建立用户id的映射
    staffPhoto: state => state.user.userInfo.staffPhoto,    // 建立用户头像的映射
    companyId: state => state.user.userInfo.companyId,      // 建立用户的companyId的映射
    routes: state => state.permission.routes                // 建立权限模块下的快捷访问 - 用于左侧菜单的渲染
}
export default getters
